package javaDemo01;

public class Goods {
    public String name;
    public String id;
    public int price;
    public Goods(){
    }

    public Goods(String name, String id, int price) {
        this.name = name;
        this.id = id;
        this.price = price;
    }

    public String getName() {
        System.out.println("调用Goods的getName方法");
        return name;

    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        System.out.println("调用Goods的getId方法");
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getPrice() {
        System.out.println("调用Goods的getPrice方法");
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
}
